<template>
  <div>
    <Treeitem :treedata="treedata"></Treeitem>
</div>
</template>

<script>
import './assets/layui/css/layui.css'
import Treeitem from './treeitem'
export default {
  name: "tree",
  data() {
    return {
      treedata: [
        {
          name: "1",
          sub: [{
            name: "1-1", sub: [
              {name: "1-1-1"}, {name: "1-1-2"}]
          },
            {
              name: "1-2", sub:
                [{name: "1-2-1"}, {name: "1-2-2"}]
            }]
        },
        {
          name: "2",
          sub: [
            {
              name: "2-1", sub:
                [{name: "2-1-1"}, {name: "2-1-2"}]
            },
            {
              name: "2-2", sub: [
                {name: "2-2-1"}, {name: "2-2-2"}]
            }]
        }


      ],

    }
  },
  components:{
    Treeitem
  }
}


</script>

<style scoped>

</style>
